package foodmaterial.dao;

import foodmaterial.dto.PurchaseBillDto;
import foodmaterial.dto.PurchasePlanDto;
import foodmaterial.dto.PurchaseSummaryDto;
import foodmaterial.dto.SupplierDto;
import foodmaterial.entity.PurchaseBill;
import foodmaterial.entity.PurchaseBillDetails;
import foodmaterial.entity.PurchaseBillTrack;
import foodmaterial.entity.Supplier;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface PurchaseDao {
    List<Supplier> selectSupplier(SupplierDto dto) ;

    int insertSupplier(Supplier supplier) ;

    int batchInsertSupplier(List<Supplier> suppliers) ;

    int updateSupplier(Supplier supplier) ;

    int insertPurchaseBill(PurchaseBill purchaseBill) ;

    int updatePurchaseBill(PurchaseBill purchaseBill) ;

    List<PurchaseBill> selectPurchaseBill(PurchaseBillDto dto) ;

    int insertPurchaseBillDetails(List<PurchaseBillDetails> purchaseBillDetails) ;

    int deletePurchaseBillDetails(Long purchaseBillId) ;

    List<PurchaseBillDetails> selectPurchaseBillDetails(Long purchaseBillId) ;

    PurchaseBill selectPurchaseBillById(Long id) ;

    List<PurchaseBill> selectPrintPurchaseBill(List<Long> ids) ;

    List<PurchaseBillDetails> selectPlan(PurchasePlanDto dto) ;

    List<PurchaseBillDetails> selectProcessPlan(PurchasePlanDto dto) ;

    List<PurchaseBillDetails> selectPurchaseSummary(PurchaseSummaryDto dto) ;

    Double selectPurchaseSummaryTotalMoney(PurchaseSummaryDto dto) ;

    int checkSupplier() ;
    void truncateSupplier() ;
}
